<%@page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="DBConnection.DB"%>
<%@page import="java.sql.*"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>table</title>
		<link href="../../css/layer.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="../../js/jquery-1.7.2.min.js"></script>
		<script type="text/javascript" src="../../js/jquery-ui-1.8.21.custom.min.js"></script>
	</head>
  
  <body>
    <%
    	String id = request.getParameter("id");
		DB db = new DB();
		db.ConnectDB();
		ResultSet rs = null;
		String sql ="";
		sql = "select * from 实验基地,单位  where 所属单位编号=单位编号 and 单位编号='"+id+"'";
		System.out.println(sql);
     %>
     	<div class="table_list">
			<table class="table1" width="100%" cellpadding="0" cellspacing="0">
				<tr class="tr_bt">
					<td class="td2" width="60%">
						基地名称
					</td>
					<td class="td2">
						所属单位
					</td>
				</tr>
				<%
					rs = db.sm.executeQuery(sql);
					while (rs.next()) {
				%>
				<tr class="tr_1">
					<td class="td2">
						<a href="syjdtable2.jsp?id=<%=rs.getString("研究实验基地编号")%>"><%=rs.getString("研究实验基地名称")%></a>
					</td>
					<td class="td8" style="border-right: none;"><a href="dwtable2.jsp?id=<%=rs.getString("所属单位编号")%>"><%=rs.getString("单位名称")%></a></td>
				</tr>
				<%
				}
				db.CloseDB();
				 %>
				</table>
			<table class="table1" width="100%" cellpadding="0" cellspacing="0">
				<tr class="tr_1">		
				</tr>
			</table>
				</div>
				<script>
				window.parent.$("#fanhui").show();
				</script>
  </body>
</html>
